home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / xuser.arc / XU.DOC < prev    next >
Encoding:
Text File  |  1987-11-30  |  5.5 KB  |  205 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                            XUser v1.1 - Nov 30 1987
  11.  
  12.  
  13.                           A Opus* (NoTm) utility ...
  14.  
  15.  
  16.          Copyright (C) 1987 Joaquim Homrighausen, all rights reserved
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 1
  25.  
  26.  
  27.     One of my basic needs is to take certain action depending on
  28.     who is on my board. Not specified by user number since that
  29.     can change by a simple "user sort".
  30.  
  31.     The main function of the program was to scan for a certain
  32.     user name, but I have now included support for several
  33.     criterias - such as HELP and PRIV level as well as the ANSI
  34.     flag.
  35.  
  36.     For complete syntax, please print out or look into the CTL
  37.     file supplied with this package. The name XU.CTL is not
  38.     required, you may specify anything on the command line and
  39.     the program will take that as the CTL file definition. 
  40.  
  41.  
  42.  
  43.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 2
  44.  
  45.  
  46.     The CTL file is *not* compiled, just simply scanned through
  47.     (even though compiling usually cuts the time, XU scans the
  48.     file fast enough) - the advantage is that you won't have so
  49.     many files created by small utilities filling your harddisk.
  50.  
  51.     This program does support multiple LASTUSER.* files (if you
  52.     are NOT running Opus* v1.00 or higher, don't worry about
  53.     this) by checking which one is the most recent one and taking
  54.     the user name from there. So if you're running more than one
  55.     Opus* on your machine, no worries, it will work.
  56.  
  57.     OPERATION:
  58.         ----------
  59.     You can execute the program directly from Opus, or thru a
  60.     batch file. If you execute the program from a batch file, you
  61.     can "pickup" whatever code is returned by XU and perform
  62.     the proper action.
  63.  
  64.     The errorlevels are set as follows:
  65.  
  66.         5 - User found, and proper action taken
  67.         4 - Command Execution Error
  68.         3 - Memory Allocation Error
  69.         2 - Illegal command encountered in CTL file
  70.         1 - File Access Error
  71.         0 - Program completed w/o any action
  72.  
  73.  
  74.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 3
  75.  
  76.  
  77.     Memory allocation error is a most un-likely one, it will
  78.     only occur when you simply do not have enough memory free
  79.     to process all the USER statements.
  80.  
  81.     Get down to it...
  82.  
  83.     EXAMPLE:
  84.         --------
  85.     In my WELCOME.??? file I have a embedded command to force Opus*
  86.     to call a batchfile called CHECKUSR.BAT which contains very
  87.     simple commands.
  88.  
  89.     (1)    REM. CheckUser, batchfile for XUser
  90.     (2)    REM.
  91.     (3)    ECHO OFF
  92.     (4)    Copy \opus\misc\empty.txt \opus\misc\show.bbs
  93.     (5)    XU
  94.     
  95.     In my CTL file for XU, I have several User names that I would
  96.     like to keep off my board, and some that I'd like to give a
  97.     warning.
  98.  
  99.     (Example of XU.CTL in my env)
  100.         %
  101.         %
  102.         USER The Hacker,    kill
  103.         USER JigSaw,        warning
  104.         USER Brutus,        warning
  105.         %
  106.         %
  107.  
  108.     (The KILL.BAT file)
  109.         rem.
  110.         rem.
  111.         dtr com2: off
  112.         rem.
  113.         rem. Boot is usually required here, so that's what
  114.         rem. I do.
  115.         boot
  116.  
  117.     (The WARNING.BAT file)
  118.         rem.
  119.         rem.
  120.         copy \opus\misc\warning.* \opus\misc\show.*
  121.         rem.
  122.         rem.
  123.  
  124.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 4
  125.  
  126.  
  127.     Two more commands have been added in v1.03, these are:
  128.  
  129.         1) PRIV <level> <command>
  130.         2) HELP <level> <command>
  131.  
  132.     The reason for these two new commands is that sometimes, you
  133.     might want to include a whole group of people at the same
  134.     privilege level or help level in your criteria.
  135.  
  136.     You could for example have Opus* display a different bulletin
  137.     depending on the user's privilege level. Or maybe just a
  138.     little message depending on the user's help level.
  139.  
  140.     I could keep on listing many different ways of using this, but
  141.     alas, it's all up to you.
  142.  
  143.     IMPORTANT: The order in which the commands are scanned is
  144.             1) USER
  145.             2) PRIV
  146.             3) HELP
  147.             4) ANSI
  148.  
  149.     So, if no match is found w/the user argument, the program will
  150.     continue with the priv arg(s) and so on.
  151.  
  152.  
  153.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 5
  154.  
  155.  
  156.     The second line in my Welcome.* files is ^OSC:\Opus\Misc\Show
  157.     which will show the file specified.
  158.  
  159.     If the user wasn't found, no files will overwrite the SHOW.*
  160.     files, hence Opus will display a empty file and continue its
  161.     execution.
  162.  
  163.     If the user was found w/a warning, the new SHOW.* file will
  164.     be shown. And if the user was found and executed the KILL
  165.     command, everything would be fine as well.
  166.  
  167.  
  168.     There are several ways to do this, this is just one example.
  169.     You could for example release control back to Opus after the
  170.     kill command (lower the DTR) is executed and the user would
  171.     be logged off. You could also create a new SHOW file that
  172.     could contain the embedded CTRL-X etc etc etc.
  173.  
  174.  
  175.  
  176.         XUser v1.1 - Nov 30 1987            [User's Manual]    Page 6
  177.  
  178.  
  179.     NOTES:
  180.     ------
  181.     The command in the ctl file to execute does not have to be
  182.     a batchfile of course. It could for example be: DTR COM1 OFF
  183.     to lower DTR on Com1: and then return to Opus. 
  184.  
  185.     This program was written because I wanted it, but now I know
  186.     a lot of people are using it, so if you have any suggestions
  187.     to improvement or ideas that you have, please let me know ...
  188.  
  189.         One more thing,  I know this manual 'aint no artwork, but hey,
  190.         it's not the doing, it's the thinking!
  191.  
  192.     Please send bug-reports (Aaaarrgh) to Opus node 1:135/20 ...
  193.  
  194.         Joaquim Homrighausen
  195.         5301 NW 161 Street
  196.        Miami FL 33014
  197.     USA
  198.  
  199.     *) Opus is written by Wynn Wagner III, (C) 1987 WW III
  200.  
  201.         Copyright (C) 1987 Joaquim Homrighausen, all rights reserved
  202.  
  203.  
  204.  
  205.